﻿using System;
using System.Collections;
using System.Data;
namespace XF.IDAL
{
	/// <summary>
	/// 接口层Bill_DTOItems
	/// </summary>
	public interface IBill_DTOItems
	{
		#region  成员方法
		/// <summary>
		/// 得到最大ID
		/// </summary>
		int GetMaxId();
		/// <summary>
		/// 是否存在该记录
		/// </summary>
		bool Exists(int Id);
		/// <summary>
		/// 增加一条数据
		/// </summary>
		int Add(XF.Model.Bill_DTOItems model);
		/// <summary>
		/// 更新一条数据
		/// </summary>
		bool Update(XF.Model.Bill_DTOItems model);
		/// <summary>
		/// 删除一条数据
		/// </summary>
		bool Delete(int Id);
		bool DeleteList(string Idlist );
		/// <summary>
		/// 得到一个对象实体
		/// </summary>
		XF.Model.Bill_DTOItems GetModel(int Id);
		XF.Model.Bill_DTOItems DataRowToModel(DataRow row);
		/// <summary>
		/// 获得数据列表
		/// </summary>
		DataSet GetList(string strWhere);
		/// <summary>
		/// 获得前几行数据
		/// </summary>
		DataSet GetList(int Top,string strWhere,string filedOrder);
		int GetRecordCount(string strWhere);
		DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex);
		/// <summary>
		/// 根据分页获得数据列表
		/// </summary>
		//DataSet GetList(int PageSize,int PageIndex,string strWhere);
		#endregion  成员方法
		#region  MethodEx
		// <summary>
		/// 获取分页数据
		/// </summary>
		/// <param name="strWhere"></param>
		/// <param name="strOrder"></param>
		/// <param name="pageIndex"></param>
		/// <param name="pageSize"></param>
		/// <param name="count"></param>
		/// <returns></returns>
		DataTable GetListByPage(string strWhere, string strOrder, int pageIndex, int pageSize, ref int count);

		DataTable GetDetailListByPage(string strWhere, string strOrder, int pageIndex, int pageSize, ref int count);

		DictionaryEntry GetAddSql(XF.Model.Bill_DTOItems model);

		DictionaryEntry GetUpdateSql(XF.Model.Bill_DTOItems model);

		/// <summary>
		/// 删除一条数据
		/// </summary>
		DictionaryEntry GetDeleteSql(string orderCode);

		/// <summary>
		/// 获得数据列表
		/// </summary>
		DataSet GetDetailList(string strWhere);

		decimal GetLastPrice(int customerId, int materielId);

		DataSet GetSaleStatementUnclean(int customerId);

		DataSet GetSaleStatementUnclean(int iCustomerId, DateTime dateCheckOut);

		DataSet GetCheckOutData(int iCustomerId, DateTime dateCheckOut);

		DataSet GetSaleStatement(int iCustomerId);

		/// <summary>
		/// 获取历史订单
		/// </summary>
		/// <param name="strWhere"></param>
		/// <returns></returns>
		DataSet GetHistoryList(string strWhere);

		/// <summary>
		/// 更新实收数据
		/// </summary>
		bool UpdatePaid(int id, decimal paid);

		/// <summary>
		/// 得到一个对象实体
		/// </summary>
		XF.Model.V_SaleStatement ToStatementModel(DataRow row);

		/// <summary>
		/// 得到一个对象实体
		/// </summary>
		XF.Model.Bill_DTOItems GetDetailModel(int Id);
		#endregion  MethodEx
	} 
}
